package cn.itcast.itcaststore.domain;


import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 订单表
 */
public class Orders {

    //订单id
    private String id;
    //订单价格
    private double money;
    //收货地址
    private String receiverAddress;
    //收货人姓名
    private String receiverName;
    //收货人电话
    private String receiverPhone;
    //订单状态   1:已支付  0：未支付   默认未支付
    private int payState;
    //订单生成时间
    private Date orderTime;
    //订单所属用户
    private User user;

    private List<OrderItem> orderItems = new ArrayList<OrderItem>();

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public double getMoney() {
        return money;
    }

    public void setMoney(double money) {
        this.money = money;
    }

    public String getReceiverAddress() {
        return receiverAddress;
    }

    public void setReceiverAddress(String receiverAddress) {
        this.receiverAddress = receiverAddress;
    }

    public String getReceiverName() {
        return receiverName;
    }

    public void setReceiverName(String receiverName) {
        this.receiverName = receiverName;
    }

    public String getReceiverPhone() {
        return receiverPhone;
    }

    public void setReceiverPhone(String receiverPhone) {
        this.receiverPhone = receiverPhone;
    }

    public int getPayState() {
        return payState;
    }

    public void setPayState(int payState) {
        this.payState = payState;
    }

    public Date getOrderTime() {
        return orderTime;
    }

    public void setOrderTime(Date orderTime) {
        this.orderTime = orderTime;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public List<OrderItem> getOrderItems() {
        return orderItems;
    }

    public void setOrderItems(List<OrderItem> orderItems) {
        this.orderItems = orderItems;
    }

    @Override
    public String toString() {
        return "Orders{" +
                "id='" + id + '\'' +
                ", money=" + money +
                ", receiverAddress='" + receiverAddress + '\'' +
                ", receiverName='" + receiverName + '\'' +
                ", receiverPhone='" + receiverPhone + '\'' +
                ", payState=" + payState +
                ", orderTime=" + orderTime +
                ", user=" + user +
                ", orderItems=" + orderItems +
                '}';
    }


}
